<?php require(DIR_TEMPLATE . C('config_template')."/setting/setting.php" ); ?>
<?php echo $header; ?>

<?php if ($SPAN[0]) { ?>
  <div class="span<?php echo $SPAN[0]; ?>">
    <?php echo $column_left; ?>
  </div>
<?php } ?>

<div class="span<?php echo $SPAN[1];?>">
<div id="content">
  <div class="breadcrumb">
    <?php foreach ($breadcrumbs as $breadcrumb) { ?>
    <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
    <?php } ?>
  </div>
  <?php echo $content_top; ?>
  <h1><?php echo $_['heading_title']; ?></h1>
  <table class="list">
    <thead>
      <tr>
        <td class="left" colspan="2"><?php echo $_['text_return_detail']; ?></td>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="left" style="width: 50%;"><b><?php echo $_['text_return_id']; ?></b> #<?php echo $return_id; ?><br />
          <b><?php echo $_['text_date_added']; ?></b> <?php echo $date_added; ?></td>
        <td class="left" style="width: 50%;"><b><?php echo $_['text_order_id']; ?></b> #<?php echo $order_id; ?><br />
          <b><?php echo $_['text_date_ordered']; ?></b> <?php echo $date_ordered; ?></td>
      </tr>
    </tbody>
  </table>
  <h2><?php echo $_['text_product']; ?></h2>
  <table class="list">
    <thead>
      <tr>
        <td class="left" style="width: 33.3%;"><?php echo $_['column_product']; ?></td>
        <td class="left" style="width: 33.3%;"><?php echo $_['column_model']; ?></td>
        <td class="right" style="width: 33.3%;"><?php echo $_['column_quantity']; ?></td>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="left"><?php echo $product; ?></td>
        <td class="left"><?php echo $model; ?></td>
        <td class="right"><?php echo $quantity; ?></td>
      </tr>
    </tbody>
  </table>
  <table class="list">
    <thead>
      <tr>
        <td class="left" style="width: 33.3%;"><?php echo $_['column_reason']; ?></td>
        <td class="left" style="width: 33.3%;"><?php echo $_['column_opened']; ?></td>
        <td class="left" style="width: 33.3%;"><?php echo $_['column_action']; ?></td>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="left"><?php echo $reason; ?></td>
        <td class="left"><?php echo $opened; ?></td>
        <td class="left"><?php echo $action; ?></td>
      </tr>
    </tbody>
  </table>
  <?php if ($comment) { ?>
  <table class="list">
    <thead>
      <tr>
        <td class="left"><?php echo $_['text_comment']; ?></td>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="left"><?php echo $comment; ?></td>
      </tr>
    </tbody>
  </table>
  <?php } ?>
  <?php if ($histories) { ?>
  <h2><?php echo $_['text_history']; ?></h2>
  <table class="list">
    <thead>
      <tr>
        <td class="left" style="width: 33.3%;"><?php echo $_['column_date_added']; ?></td>
        <td class="left" style="width: 33.3%;"><?php echo $_['column_status']; ?></td>
        <td class="left" style="width: 33.3%;"><?php echo $_['column_comment']; ?></td>
      </tr>
    </thead>
    <tbody>
      <?php foreach ($histories as $history) { ?>
      <tr>
        <td class="left"><?php echo $history['date_added']; ?></td>
        <td class="left"><?php echo $history['status']; ?></td>
        <td class="left"><?php echo $history['comment']; ?></td>
      </tr>
      <?php } ?>
    </tbody>
  </table>
  <?php } ?>
  <div class="buttons">
    <div class="right"><a href="<?php echo $continue; ?>" class="button"><?php echo $_['button_continue']; ?></a></div>
  </div>
  <?php echo $content_bottom; ?></div>
</div>

<?php if ($SPAN[2]) { ?>
  <div class="span<?php echo $SPAN[2]; ?>">
    <?php echo $column_right; ?>
  </div>
<?php } ?>

<?php echo $footer; ?>